import request from '@/utils/request'

// 查询学生（客户）信息列表
export function listStudent(query) {
  return request({
    url: '/edu/student/list',
    method: 'get',
    params: query
  })
}

export function listStudentOfficial(query) {
  return request({
    url: '/edu/student/listOfficial',
    method: 'get',
    params: query
  })
}

// 查询学生（客户）信息详细
export function getStudent(studentId) {
  return request({
    url: '/edu/student/' + studentId,
    method: 'get'
  })
}

// 新增学生（客户）信息
export function addStudent(data) {
  return request({
    url: '/edu/student',
    method: 'post',
    data: data
  })
}

// 修改学生（客户）信息
export function updateStudent(data) {
  return request({
    url: '/edu/student',
    method: 'put',
    data: data
  })
}

export function graduateStudent(studentId) {
  return request({
    url: '/edu/student/graduate/' + studentId,
    method: 'post'
  })
}

export function stepInStudent(studentId, data) {
  return request({
    url: '/edu/student/stepIn/' + studentId,
    method: 'post',
    data: data
  })
}

// 删除学生（客户）信息
export function delStudent(studentId) {
  return request({
    url: '/edu/student/' + studentId,
    method: 'delete'
  })
}

// 导出学生（客户）信息
export function exportStudent(query) {
  return request({
    url: '/edu/student/export',
    method: 'get',
    params: query
  })
}

// 转化学生（客户）信息
export function convertStudent(studentId, studentType, comments) {
  return request({
    url: '/edu/student/convert/' + studentId + '/' + studentType + '/' + comments,
    method: 'put'
  })
}

// 审核
export function passExamine(query,studentIds) {
  return request({
    url: '/edu/student/passExamine/' + studentIds ,
    method: 'put',
    params: query
  })
}
export function listExamineStudent(query) {
  return request({
    url: '/edu/student/listExamine',
    method: 'get',
    params: query
  })
}
export function rtnMoney(query, studentIds) {
  return request({
    url: '/edu/student/rtnMoney/' + studentIds,
    method: 'put',
    params: query
  })
}
